import 'package:flutter/material.dart';
import 'package:flutterdouban/pages/profile/profile_detail.dart';

class JKProfileContent extends StatefulWidget {
  @override
  _JKProfileContentState createState() => _JKProfileContentState();
}

class _JKProfileContentState extends State<JKProfileContent> {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        children: [
          RaisedButton(
            child: Text('跳转 我的 详情'),
            onPressed: () {
              _jumpToHomeDtail1(context);
            },
          ),
        ],
      ),
    );
  }

  void _jumpToHomeDtail(BuildContext context) {
    Navigator.of(context).push(PageRouteBuilder(
      transitionDuration: Duration(seconds: 3),
      pageBuilder: (ctx, animarion1, animation2) {
        return FadeTransition(
          opacity: animarion1,
          child: JKProfileDetail(),
        );
      }
    ));
  }

  void _jumpToHomeDtail1(BuildContext context) {
    Navigator.of(context).push(MaterialPageRoute(
        builder: (ctx) {
          return JKProfileDetail();
        },
    ));
  }
}
